/**
 * 
 */
package com.globalresources.ui.struts.action.login;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.interceptor.ServletRequestAware;
import com.globalresources.commons.AbstractAction;
import com.globalresources.commons.PagerService;
import com.globalresources.business.inface.INewsService;
import java.util.List;
import com.globalresources.po.News;
/**
 * @author songduanlei@gmail.com
 *
 */
public class WelcomeAction extends AbstractAction implements ServletRequestAware{
	private PagerService pagerService;
	private HttpServletRequest request;
	public void setServletRequest(HttpServletRequest request) {
		this.request = request;
	}		
	
	private INewsService newsService;
	private List<News> latestNews;
	
	/**
	 * 获取新闻列表
	 * */
	public String getNewsList(){		
		latestNews=newsService.getNewsList();
		System.out.println(latestNews.size());
		return SUCCESS;
	}
	
	/**
	 * @return the newsService
	 */
	public INewsService getNewsService() {
		return newsService;
	}

	/**
	 * @param newsService the newsService to set
	 */
	public void setNewsService(INewsService newsService) {
		this.newsService = newsService;
	}

	/**
	 * @return the pagerService
	 */
	public PagerService getPagerService() {
		return pagerService;
	}

	/**
	 * @param pagerService the pagerService to set
	 */
	public void setPagerService(PagerService pagerService) {
		this.pagerService = pagerService;
	}



	/**
	 * @return the latestNews
	 */
	public List<News> getLatestNews() {
		return latestNews;
	}

	/**
	 * @param latestNews the latestNews to set
	 */
	public void setLatestNews(List<News> latestNews) {
		this.latestNews = latestNews;
	}
	

}
